<?php $this->placeholder('onReady')->captureStart() ?>
	$("#<?php echo $this->id_tablesorter?>").tablesorter({sortList:[[1,0]]}); 
<?php $this->placeholder('onReady')->captureEnd() ?>



<?if($this->rows):?>

<table id="<?= $this->id_tablesorter?>" width="100%" class="tablesorter"> 
    <caption>
       <div id="total_table_filter" style="float: right;">Total <span class="filtradas"><?=count($this->rows)?> Registros</span></div>    
    </caption>
<thead>
<tr>
    <th><?php echo $this->translate('Mes año');?></th>
    <th><?php echo $this->translate('Sala');?></th>
    <th><?php echo $this->translate('Tipo Sala');?></th>
    <th><?php echo $this->translate('Consumo');?> kWh</th>
    <th><?php echo $this->translate('Potencia');?> kW</th>
    <th><?php echo $this->translate('Limite kW frio');?></th>
    <th><?php echo $this->translate("Nº CRAC's");?></th>
    <th><?php echo $this->translate('Superficie Neta');?> m<sup>2</sup></th>
    <th><?php echo $this->translate('Superficie contratrada');?> m<sup>2</sup></th>
    <th><?php echo $this->translate('Superficie Perdida');?> m<sup>2</sup></th>
    <th><?php echo $this->translate('Superficie Libre');?> m<sup>2</sup></th>
    <th><?php echo $this->translate('Ratio W/m m<sup>2</sup> netos');?></th>
    <th><?php echo $this->translate('Ratio W/m m<sup>2</sup> contratados');?></th>
    
    <th><?php echo $this->translate('Limite Frio');?> W/m<sup>2</sup></th>
    <th>% W/m<sup>2</sup></th>
</tr>
</thead>
<tbody>
<?foreach($this->rows as $k => $v):?>
<tr>
    <td><?=$v['fecha']?></td>
    <td><?=$v['nombre']?></td>
    <td><?=$v['tipo_sala']?></td>
    <td><?=$this->NumEs($v['consumo'],0)?></td>
    <td><?=$this->NumEs($v['potencia'],2)?></td>
    <td><?=$this->NumEs($v['potencia_frio'],2)?></td>
    <td><?=$v['nclimas']?></td>
    <td><?=$this->NumEs($v['superficie_neta'],2)?></td>
    <td><?=$this->NumEs($v['superficie_contratada'],2)?></td>
    <td><?=$this->NumEs($v['superficie_perdida'],2)?></td>
    <td><?=$this->NumEs($v['superficie_libre'],2)?></td>
    <td><?=$this->NumEs($v['ratiowm2_neta'],2)?></td>
    <td><?=$this->NumEs($v['ratiowm2_contratada'],2)?></td>
    <td><?=$this->NumEs($v['limite'],2)?></td>
    <td><?=$this->NumEs($v['porcentaje'],2)?></td>
</tr>
<?endforeach?>
</tbody>
<tfoot>
<tr>
    <th></th>
    <th></th>
    <th></th>
    <th><?=$this->NumEs($this->suma['consumo'],0)?></th>
    <th><?=$this->NumEs($this->suma['potencia'],0)?></th>
    <th><?=$this->NumEs($this->suma['potencia_frio'],0)?></th>
    <th><?=$this->suma['nclimas']?></th>
    <th><?=$this->NumEs($this->suma['superficie_neta'],0)?></th>
    <th><?=$this->NumEs($this->suma['superficie_contratada'],0)?></th>
    <th><?=$this->NumEs($this->suma['superficie_perdida'],0)?></th>
    <th><?=$this->NumEs($this->suma['superficie_libre'],0)?></th>
    <th></th>
    <th></th>
</tr>
</tfoot>
</table>
<div class="atencion ui-state-highlight" > 
    <span class="ui-icon ui-icon-circle-check" style="float:left;"></span>Publicado<br /><br />
    <span class="ui-icon ui-icon-alert" style="float:left;"></span>No Publicado, no es visible para administración, JP,etc<br />
</div>

<?endif?>



